﻿<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="TelerikWrappedControl.CodaProduzioneTelerikGrid"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:TelerikWrappedControl="clr-namespace:TelerikWrappedControl" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    <UserControl.Resources>
        <TelerikWrappedControl:StatoAvanzamentoConverter x:Key="saConverter"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="278*" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Height="20"> 
            <Image Source="search-13.png" />
            <TextBlock Text=" Cerca : " VerticalAlignment="Center" FontSize="14"/>
            <TextBox x:Name="textBoxFilterValue" TextChanged="textBoxFilterValue_TextChanged" MinWidth="150" />
            <Button Click="Button_Click">
                <Image Source="delete.png" />
            </Button>
        </StackPanel>
        <telerik:RadGridView Grid.Row="1" x:Name="radGrid" CanUserFreezeColumns="False" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" ItemsSource="{Binding Path=Value}" IsReadOnly="True" SelectedItem="{Binding Path=Value.SelectedItem, Mode=TwoWay}" AutoGenerateColumns="False" 
                             telerik:StyleManager.Theme="Office_Blue" SelectionMode="Extended" Grid.RowSpan="2" ShowGroupPanel="False" >
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Cliente" DataMemberBinding="{Binding Documento.Anagrafica.RagioneSociale}"  />
                <telerik:GridViewDataColumn Header="Ordine" DataMemberBinding="{Binding Path=Documento.CodiceDocumentoEsterno}"  />
                <telerik:GridViewDataColumn Header="Articolo" DataMemberBinding="{Binding Path=Articolo.CodiceArticolo}" />
                <telerik:GridViewDataColumn Header="Descrizione" DataMemberBinding="{Binding Path=Articolo.Descrizione}" />
                <telerik:GridViewDataColumn Header="Q.tà" DataMemberBinding="{Binding Path=Quantità}" />
                <telerik:GridViewDataColumn Header="DataConsegna" DataMemberBinding="{Binding Path=DataConsegna, StringFormat=\{0:d\}}" />
                <telerik:GridViewDataColumn Header="StatoAvanzamento" DataMemberBinding="{Binding Path=StatoAvanzamento, Converter={StaticResource saConverter}}" />
                <telerik:GridViewDataColumn Header="Trattamento" DataMemberBinding="{Binding Path=Articolo.TrattamentoSuperficiale.Descrizione}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>
